package c.a.a.z.c;

import c.a.a.b0.k.c;
import c.a.a.e0.f;
import c.a.a.f0.a;
import java.util.List;
import java.util.Objects;

/* compiled from: GradientColorKeyframeAnimation */
public class d extends f<c> {
    public final c i;

    public d(List<a<c>> list) {
        super(list);
        int i = 0;
        c cVar = (c) ((a) list.get(0)).b;
        if (cVar != null) {
            i = cVar.b.length;
        }
        this.i = new c(new float[i], new int[i]);
    }

    public Object f(a aVar, float f) {
        c cVar = this.i;
        c cVar2 = (c) aVar.b;
        c cVar3 = (c) aVar.c;
        Objects.requireNonNull(cVar);
        if (cVar2.b.length == cVar3.b.length) {
            for (int i = 0; i < cVar2.b.length; i++) {
                cVar.a[i] = f.e(cVar2.a[i], cVar3.a[i], f);
                cVar.b[i] = b.i.b.f.s0(f, cVar2.b[i], cVar3.b[i]);
            }
            return this.i;
        }
        StringBuilder g = c.b.a.a.a.g("Cannot interpolate between gradients. Lengths vary (");
        g.append(cVar2.b.length);
        g.append(" vs ");
        throw new IllegalArgumentException(c.b.a.a.a.c(g, cVar3.b.length, ")"));
    }
}
